import React from "react";
import { ViewAllProps } from "./type";
import Image from "next/image";
import {
  globalFlex,
  globalImage,
} from "@/user.InterfaceLayer/constants/styles/CommonStyles";
import Link from "next/link";
import TextAtom from "../../Atoms/Text.Atom";
import TextAtomEnum from "../../Atoms/Text.Atom/enum";

const ViewAll: React.FC<ViewAllProps> = (props) => {
  const { desciption } = props;
  return (
    <Link href="/catalog" className={`${globalFlex} cursor-pointer`}>
      <TextAtom
        type={TextAtomEnum.enum_h5}
        className="text-light text-black mr-2"
      >
        {desciption}
      </TextAtom>
      <div className="w-3 h-2">
        <Image
          className={`${globalImage}`}
          src={`/icons/arrowRight.svg`}
          width={100}
          height={100}
          alt="arrowRight"
        />
      </div>
    </Link>
  );
};

export default React.memo(ViewAll);
